[Agent] Inject index with sane defaults to configuration #16903
[Agent] Inject index with sane defaults to configuration #16903michalpristas merged 10 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/ingest-management (Project:fleet) |
ruflin
left a comment
There was a problem hiding this comment.
I think it's important that the config we have here is the a config that already provides value to the user. It's not only a sample. I compare to to running metricbeat with ./metricbeat. All the system data is just there and works.
| - /var/log/hello1.log | ||
| - /var/log/hello2.log | ||
| datasources: | ||
| - namespace: sample |
There was a problem hiding this comment.
Why not using the default namespace here?
| - type: logs | ||
| processors: | ||
| streams: | ||
| - dataset: sample.acccess |
There was a problem hiding this comment.
I suggest if we don't have any good default logs here, we just skip the log parts / leave it commented out. I would suggest the system logs here (check logs system module)
There was a problem hiding this comment.
system module seems purely linux oriented so i left it out so our future windows test wont fail on something like this
There was a problem hiding this comment.
That is where in the future our constraints come into play. I think part of it work also on OS X
The samples you put in will also not work. Suggestion: Lets skip the logs part for now but have a logs sample based on the Linux logs inside but commented out. So users can easily edit it.
| paths: /var/log/sample/error.log | ||
| - type: system/metrics | ||
| streams: | ||
| - metricset: cpu |
There was a problem hiding this comment.
Lets add a few more here like memory, disk.
ruflin
left a comment
There was a problem hiding this comment.
Can you change to the default namespace everywhere?
| - /var/log/hello1.log | ||
| - /var/log/hello2.log | ||
| datasources: | ||
| - namespace: sample |
There was a problem hiding this comment.
| - namespace: sample | |
| - namespace: default |
| - /var/log/hello1.log | ||
| - /var/log/hello2.log | ||
| datasources: | ||
| - namespace: sample |
There was a problem hiding this comment.
| - namespace: sample | |
| - namespace: default |
| - /var/log/hello1.log | ||
| - /var/log/hello2.log | ||
| datasources: | ||
| - namespace: sample |
There was a problem hiding this comment.
| - namespace: sample | |
| - namespace: default |
| github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= | ||
| github.com/eclipse/paho.mqtt.golang v1.2.1-0.20200121105743-0d940dd29fd2 h1:DW6WrARxK5J+o8uAKCiACi5wy9EK1UzrsCpGBPsKHAA= | ||
| github.com/eclipse/paho.mqtt.golang v1.2.1-0.20200121105743-0d940dd29fd2/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= | ||
| github.com/elastic/beats v7.6.1+incompatible h1:4iPVpFr8BSJW2fUVi+/tYXQ4v/IYVx0k2PPLTg8cfks= |
ph
left a comment
There was a problem hiding this comment.
code LGTM, I haven't tested it.
Test looks OK to catch the problems.
| - enabled: true | ||
| metricset: info | ||
|
|
||
| settings.monitoring: |
|
@michalpristas lets add this change to the new changelog too, so we know when the new syntax has landed. |
|
yep i will after we merge changelog in |
| settings.monitoring: | ||
| use_output: monitoring | ||
|
|
||
| management: |
There was a problem hiding this comment.
Not in this PR, but thinking this + config should also be under settings?
| inputs: | ||
| - type: system/metrics | ||
| streams: | ||
| - metricset: cpu |
There was a problem hiding this comment.
Had a quick chat with @michalpristas about this on Slack. The problem here is that this will send data to metrics-generic-default but it should end up in metrics-system.cpu-default. We probably have to add the dataset here at the moment and simplify it later.
ph
left a comment
There was a problem hiding this comment.
LGTM, lets get that merged in.
|
I've added the "need_backport" will merge after #16885 |
|
Jenkins test this |
Migrated from: #15852
Build on top of: #15809
Added one extra rule for injecting index into inputs based on provided type and detected namespace/dataset type.
Other option was to use decorator but at the time of decorating there are already some pieces of config missing.
Draft until final configuration format is settled and mentioned PR is in, but READY for review.
It overwrites index specified in input.
Fixes: #15690
Fixes: #15691
cc @ruflin @ph